<template>
	<view class="bg-gradual-orange">
		<cu-custom bgColor="" :isBack="true">
			<block slot="back">返回</block>
			<block slot="content">我的二维码</block>
		</cu-custom>
		<view class="tac" v-if="$com.isbool(user)">
			<image :src="user.qr" class="wh40-40" mode="aspectFit"></image>
			<view class="pad5">微信扫码加入</view>
		</view>
		<view class="bcf pad5 text-black" v-if="$com.isbool(art)">
			<view v-html="art.content">
			</view>
		</view>
		<view class="list-style-1 bcf pad3 c11">
			<view>我的好友</view>
		</view>
		<view class="bcf c11">
			<view class="pad3 bdbso" v-for="item in list">
				<view class="flrc">
					<view><image class="wh15-15 round" :src="item.pic"></image></view>
					<view class="flex1 padl10 lh2">
						<view class="text-lg">{{item.name}}</view>
						<view class="c12">{{$com.str2time(item.createAt)}}</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				user: {},
				art: {},
				list: [],
			}
		},
		methods: {

		},
		onLoad() {
			let _this = this
			this.$api.get("/api/user/info", {}, function(res) {
				console.log(res)
				_this.user = res.d
			})
			this.$api.get("/api/get_page", {
				code: 'ART_INVITE'
			}, function(res) {
				console.log(res)
				_this.art = res.d
			})
			this.$api.get("/api/user/get_sons", {}, function(res) {
				console.log(res)
				_this.list = res.d
			})
		}
	}
</script>

<style>
page{
		background-color: #FFF;
	}
</style>
